package design.factory.simple;

/**
 * <p>
 * phone factory
 * </P>
 *
 * @author dingwen
 * @date 2021.10.22 11:07
 */
public class PhoneFactory {
    public Phone make(String type) {
        switch (type) {
            case "hw":
                return new HwPhoneImpl();
            case "ap":
                return new IphoneImpl();
            case "mi":
                return new MiPhoneImpl();
            default:
                return null;
        }
    }
}
